package org.dromara.system.job;

import com.aizuda.snailjob.client.job.core.annotation.JobExecutor;
import com.aizuda.snailjob.client.job.core.dto.JobArgs;
import com.aizuda.snailjob.client.model.ExecuteResult;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.dromara.system.service.ISysSystemReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@JobExecutor(name = "GetSystemReportJob")
@Slf4j
@Component
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class GetSystemReportJob {

    private final ISysSystemReportService sysSystemReportService;

    public ExecuteResult jobExecute(JobArgs jobArgs) {
        sysSystemReportService.addReport();
        return ExecuteResult.success("生成昨日报告");
    }

}
